Skip to content

Make tentative approvals less obtrusive - #859

Merged
Kobzol merged 1 commit into
rust-lang:mainfrom
Kobzol:tentative-approval-unobtrusive
Sep 25, 2026
Merged

Kobzol merged 1 commit into
rust-lang:mainfrom
Kobzol:tentative-approval-unobtrusive

Conversation

@Kobzol

@Kobzol Kobzol commented Sep 25, 2026

Copy link
Copy Markdown
Member

This PR makes tentative approvals be less "in your face". When a PR is tentatively approved, bors sends a comment that the PR was approved, or tentatively approved. It then won't send another comment once PR CI actually succeeds (this event is now silent), unlike before.

Funnily enough, this actually simplifies the "frontend" implementation of tentative approvals quite a lot.

Discussed in https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/bors.20r.2B.20after.20pr.20ci.20passes/with/626795222.

@Kobzol
Kobzol requested a review from Sakib25800 September 25, 2026 07:13
@Kobzol Kobzol mentioned this pull request Sep 25, 2026
// If we are now doing a tentative approval, we will "upgrade" it to a full approval, which is
// usually what the user wants.
// This situation should be very rare anyway.
let pr_ci_status = get_pr_ci_status(&repo, pr.github).await?;

@Sakib25800 Sakib25800 Sep 25, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this request fails, we lose the approval. Maybe we should handle this?

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would abort the approval, but we do this GitHub API request proactively, before we record the approval in the DB, so it shouldn't matter much. We already do at least one other GitHub API call before this (fetching the PR from GitHub), and a bunch of DB calls. Aborting if a network request fails is kind of a normal operation in bors, and there's not much to do here instead anyway.

@Kobzol
Kobzol added this pull request to the merge queue Sep 25, 2026
Merged via the queue into rust-lang:main with commit 56d1cb7 Sep 25, 2026
6 checks passed
@Kobzol
Kobzol deleted the tentative-approval-unobtrusive branch September 25, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants